home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Language/OS - Multiplatform Resource Library
/
LANGUAGE OS.iso
/
pccts
/
dlgdefh.fix
< prev
next >
Wrap
Text File
|
1993-07-19
|
4KB
|
95 lines
/* dlg2.h
* Things in scanner produced by dlg that should be visible to the outside
* world
*
* SOFTWARE RIGHTS
*
* We reserve no LEGAL rights to the Purdue Compiler Construction Tool
* Set (PCCTS) -- PCCTS is in the public domain. An individual or
* company may do whatever they wish with source code distributed with
* PCCTS or the code generated by PCCTS, including the incorporation of
* PCCTS, or its output, into commerical software.
*
* We encourage users to develop software with PCCTS. However, we do ask
* that credit is given to us for developing PCCTS. By "credit",
* we mean that if you incorporate our source code into one of your
* programs (commercial product, research project, or otherwise) that you
* acknowledge this fact somewhere in the documentation, research report,
* etc... If you like PCCTS and have developed a nice tool with the
* output, please mention that you developed it using PCCTS. In
* addition, we ask that this header remain intact in our source code.
* As long as these guidelines are kept, we expect to continue enhancing
* this system and expect to make other tools available as they are
* completed.
*
* ANTLR 1.06
* Will Cohen
* Purdue University
* 1989-1992
*/
struct zzdlg_state {
FILE *stream;
int (*func_ptr)();
int lookc;
int char_full;
int begcol, endcol;
int line;
};
#ifdef __STDC__
extern char *zzlextext; /* text of most recently matched token */
extern char *zzbegexpr; /* beginning of last reg expr recogn. */
extern char *zzendexpr; /* beginning of last reg expr recogn. */
extern int zzbufsize; /* how long zzlextext is */
extern int zzbegcol; /* column that first character of token is in*/
extern int zzendcol; /* column that last character of token is in */
extern int zzline; /* line current token is on */
extern int zzchar; /* character to determine next state */
extern int zzbufovf; /* indicates that buffer too small for text */
/* functions */
extern void zzadvance();
extern void (*zzerr)(char *);/* pointer to error reporting function */
extern void zzskip(); /* erase zzlextext, look for antoher token */
extern void zzmore(); /* keep zzlextext, look for another token */
extern void zzmode(int k); /* switch to automaton 'k' */
extern void zzrdstream(FILE *);/* what stream to read from */
extern void zzclose_stream();/* close the current input stream */
extern void zzrdfunc(int (*)());/* what function to get char from */
extern void zzgettok(); /* get next token */
extern void zzreplchar(char c);/* replace last recognized reg. expr. with
a character */
extern void zzreplstr(char *s);/* replace last recognized reg. expr. with
a string */
extern void zzsave_dlg_state(struct zzdlg_state *);
extern void zzrestore_dlg_state(struct zzdlg_state *);
#else
extern char *zzlextext; /* text of most recently matched token */
extern char *zzbegexpr; /* beginning of last reg expr recogn. */
extern char *zzendexpr; /* beginning of last reg expr recogn. */
extern int zzbufsize; /* how long zzlextext is */
extern int zzbegcol; /* column that first character of token is in*/
extern int zzendcol; /* column that last character of token is in */
extern int zzline; /* line current token is on */
extern int zzchar; /* character to determine next state */
extern int zzbufovf; /* indicates that buffer too small for text */
/* functions */
extern void zzadvance();
extern void (*zzerr)(); /* pointer to error reporting function */
extern void zzskip(); /* erase zzlextext, look for antoher token */
extern void zzmore(); /* keep zzlextext, look for another token */
extern void zzmode(/*k*/); /* switch to automaton 'k' */
extern void zzrdstream(); /* what stream to read from */
extern void zzclose_stream();/* close the current input stream */
extern void zzrdfunc(); /* what function to get char from */
extern void zzgettok(); /* get next token */
extern void zzreplchar(); /* replace last recognized reg. expr. with
a character */
extern void zzreplstr(); /* replace last recognized reg. expr. with
a string */
extern void zzsave_dlg_state();
extern void zzrestore_dlg_state();
#endif